package com.atguigu.eduservice.mapper;

import com.atguigu.eduservice.entity.EduCourse;
import com.atguigu.eduservice.entity.frontvo.CourseWebVo;
import com.atguigu.eduservice.entity.vo.CoursePublishVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 课程 Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2021-07-26
 */
public interface EduCourseMapper extends BaseMapper<EduCourse> {

    /**
     * 根据课程id查询课程确认信息
     * @param courseId
     * @return
     */
    public CoursePublishVo getPublishCourseInfo(@Param("courseId") String courseId);

    /**
     * 根据条件查询课程列表分页数据
     * @param courseName
     * @param courseStatus
     * @param startIndex
     * @param limit
     * @return
     */
    public List<EduCourse> getCourseListByConditionAndPage(@Param("courseName") String courseName,
                                                           @Param("courseStatus") String courseStatus,
                                                           @Param("startIndex") Integer startIndex,
                                                           @Param("limit") Integer limit);

    //根据课程id，编写SQL语句查询课程信息
    public CourseWebVo getBaseCourseInfo(@Param("courseId") String courseId);

}
